		<?php
	include "vars.php";
	include "data_include.php";
	
	if (isset($_GET['game_uuid']) == true) {
		$dataFound = false;
		$reqStr = "SELECT gd . * , SUM( gd.score * gd.score_multiplier ) as sum , p . * FROM gameplay_data gd, players p WHERE game_uuid = ".$_GET['game_uuid']." AND gd.player_id = p.id GROUP BY player_id";
		$res = $mysqli->query($reqStr);
		while($row=$res->fetch_assoc()) {
			$dataFound = true;
		}

		if($dataFound) {
			$res = $mysqli->query($reqStr);
			TS("gridtable");
				TH("ID");
				TH("Spieler");
				TH("Summe");
				while($row=$res->fetch_assoc()) {
					TRS();
						TDS("playerid");
							print($row['player_id']);
						TDE();
						TDS("playername player".$row['player_id']);
							print($row['firstName']." ".$row['lastName']);
						TDE();
						TDS("sum");
							print($row['sum']);
						TDE();
					TRE();
				}
			TE();
		}
	}

?>